package com.olt.server.oltCenter.oltClass.dto;


import com.olt.server.dto.PageInput;
import lombok.Data;

import java.util.Calendar;
import java.util.Date;

@Data
public class GetOltClassInput extends PageInput {


    Date begin;

    Date end;

    Long me;

    Boolean canSelect;

    Boolean havValidity;

    Boolean isOpen;


    public Date getBegin() {
        Calendar calendar=Calendar.getInstance();
        if(begin==null) {
            calendar.set(calendar.get(Calendar.YEAR), Calendar.JANUARY,1);
            setBegin(calendar.getTime());
        }
        calendar.setTime(begin);
        calendar.add(Calendar.YEAR,1);
        setEnd(calendar.getTime());
        return begin;
    }
}
